package com.upb.webserver.common.enums;

import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;

/**
 * WorkOrderType 工单类型：
 * 0-新建fisco链，1-新建fabric链，2-新建fisco应用，3-新建fabric应用，
 * 4-实名认证，5-审计处理，
 * 6-机构加入网络，7-机构加入应用，8-机构退出应用，9-机构退出网络
 */
@AllArgsConstructor
@NoArgsConstructor
public enum OrderTypeEnum {
    NEW_CHAIN_FISCO(0, "新建fisco链"),
    NEW_CHAIN_FABRIC(1, "新建fabric链"),
    NEW_APPLICATION_FISCO(2, "新建fisco应用"),
    NEW_APPLICATION_FABRIC(3, "新建fabric应用"),
    IDENTIFY(4, "实名认证"),
    AUDIT(5, "审计处理"),
    AGENCY_JOIN_CHAIN(6, "机构加入网络"),
    AGENCY_JOIN_APPLICATION(7, "机构加入应用"),
    AGENCY_QUIT_CHAIN(8, "机构退出网络"),
    AGENCY_QUIT_APPLICATION(9, "机构退出应用"),
    JOIN_CROSS_CHAIN(10, "跨链申请"),
    ADD_NEW_NODE_TO_CHAIN(11, "新建节点"),
    ADD_NODE_TO_APP(12, "节点加入群组");

    private byte value;
    private String description;

    OrderTypeEnum(int value, String description) {
        this.value = (byte) value;
        this.description = description;
    }

    private OrderTypeEnum(Byte type) {
        this.value = type;
    }

    public byte getValue() {
        return this.value;
    }
}
